#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

void reverse(char* p,int len)
{
	char* left = p;
	char* right = p + len-1;
	char temp = 0;
	while (left < right)
	{
		temp = *left;
		*left = *right;
		*right = temp;
		left++;
		right--;
	}
}

int main()
{
	char arr[10000] = { 0 };
	gets_s(arr);
	int len = strlen(arr);
	reverse(arr, len);

	printf("%s", arr);

	return 0;
}
